package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysProjectOverviewMapper;
import com.ruoyi.system.domain.SysProjectOverview;
import com.ruoyi.system.service.ISysProjectOverviewService;
import com.ruoyi.common.core.text.Convert;

/**
 * 项目概况Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-14
 */
@Service
public class SysProjectOverviewServiceImpl implements ISysProjectOverviewService 
{
    @Autowired
    private SysProjectOverviewMapper sysProjectOverviewMapper;

    /**
     * 查询项目概况
     * 
     * @param id 项目概况主键
     * @return 项目概况
     */
    @Override
    public SysProjectOverview selectSysProjectOverviewById(Integer id)
    {
        return sysProjectOverviewMapper.selectSysProjectOverviewById(id);
    }

    /**
     * 查询项目概况列表
     * 
     * @param sysProjectOverview 项目概况
     * @return 项目概况
     */
    @Override
    public List<SysProjectOverview> selectSysProjectOverviewList(SysProjectOverview sysProjectOverview)
    {
        return sysProjectOverviewMapper.selectSysProjectOverviewList(sysProjectOverview);
    }

    /**
     * 新增项目概况
     * 
     * @param sysProjectOverview 项目概况
     * @return 结果
     */
    @Override
    public int insertSysProjectOverview(SysProjectOverview sysProjectOverview)
    {
        sysProjectOverview.setCreateTime(DateUtils.getNowDate());
        return sysProjectOverviewMapper.insertSysProjectOverview(sysProjectOverview);
    }

    /**
     * 修改项目概况
     * 
     * @param sysProjectOverview 项目概况
     * @return 结果
     */
    @Override
    public int updateSysProjectOverview(SysProjectOverview sysProjectOverview)
    {
        sysProjectOverview.setUpdateTime(DateUtils.getNowDate());
        return sysProjectOverviewMapper.updateSysProjectOverview(sysProjectOverview);
    }

    /**
     * 批量删除项目概况
     * 
     * @param ids 需要删除的项目概况主键
     * @return 结果
     */
    @Override
    public int deleteSysProjectOverviewByIds(String ids)
    {
        return sysProjectOverviewMapper.deleteSysProjectOverviewByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除项目概况信息
     * 
     * @param id 项目概况主键
     * @return 结果
     */
    @Override
    public int deleteSysProjectOverviewById(Integer id)
    {
        return sysProjectOverviewMapper.deleteSysProjectOverviewById(id);
    }
}
